package com.samphanie.auiu.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.samphanie.auiu.admin.service.ISysUserRoleService;
import com.samphanie.auiu.mbg.mapper.UserRoleMapper;
import com.samphanie.auiu.mbg.model.SysRole;
import com.samphanie.auiu.mbg.model.UserRole;
import org.springframework.stereotype.Service;

import java.util.Optional;
import java.util.Set;

/**
 * 用户角色关联Service业务层处理
 *
 * @author zsy
 * @date 2021-05-10
 */
@Service
public class SysUserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements ISysUserRoleService {

    @Override
    public Optional<Set<SysRole>> getRoleList(Long userId) {
        return Optional.ofNullable(baseMapper.getRoleList(userId));
    }
}
